package com.yyg.usecase.datastructure;

import org.junit.Test;

/**
 * @author Lenovo
 */
public class LFUCacheTest {
    @Test
    public void lFUCacheTest(){
        LFUCache<Integer, String> lfuCache = new LFUCache<>(3);

        lfuCache.put(1, "One");
        lfuCache.put(2, "Two");
        lfuCache.put(3, "Three");
        lfuCache.display();

        lfuCache.get(1);
        lfuCache.put(4, "Four");
        lfuCache.display();

        lfuCache.put(5, "Five");
        lfuCache.display();
    }
}
